#pragma once
#include <string>
#include <iostream>

class BigNumber
{
	std::string _str;
	BigNumber x10(int n = 1) const;
public:
	BigNumber(const std::string& str);

	// output
	std::string toString() const;

	// comparers
	int compareTo(const BigNumber& another) const;
	bool operator<(const BigNumber& another) const;
	bool operator>(const BigNumber& another) const;
	bool operator==(const BigNumber& another) const;
	bool operator!=(const BigNumber& another) const;
	bool operator<=(const BigNumber& another) const;
	bool operator>=(const BigNumber& another) const;

	// operations
	BigNumber subtract(const BigNumber& another) const;
	BigNumber multiply(int digit) const;
	BigNumber divide(const BigNumber& another) const;

	BigNumber operator*(int digit) const;
	BigNumber operator-(const BigNumber& another) const;
	BigNumber operator/(const BigNumber& another) const;	
	BigNumber& operator-=(const BigNumber& another);
	BigNumber& operator/=(const BigNumber& another);
};

// output
std::ostream& operator <<(std::ostream& stream, const BigNumber& bigNumber);